<form action="<?php echo $aUrl; ?>" method="post" name="adminForm">
<!-- start search-box -->
<table> 
<tr> 
	<td align="left" width="100%"> 
		关键字: 
		<input type="text" name="search" class="text_area" value="<?php echo $search; ?>" /> 
		<button onclick="setHide('pageno', '1');this.form.submit();">查询</button>
		<button onclick="clearText('search');this.form.submit();">重置</button> 
	</td> 
	<td nowrap="nowrap">
		<select name="group_id" class="inputbox" size="1" onchange="this.form.submit();">
			<option value="0">- 所属管理组 -</option>
			<?php foreach ($groups as $group) : ?>
			<option value="<?php echo $group->group_id; ?>" <?php if ($group->group_id == $group_id) echo 'selected'; ?>><?php echo $group->group_name; ?></option>
			<?php endforeach; ?>
		</select>
		<select name="order_by" class="inputbox" size="1" onchange="this.form.submit();">
			<option value="">- 排序字段 -</option>
			<option value="dt_last_login" <?php if ($order_by === 'dt_last_login') echo 'selected'; ?>>上次登录时间</option>
			<option value="ip_last_login" <?php if ($order_by === 'ip_last_login') echo 'selected'; ?>>上次登录IP</option>
			<option value="dt_registered" <?php if ($order_by === 'dt_registered') echo 'selected'; ?>>注册时间</option>
		</select>
	</td> 
</tr> 
</table> 
<!-- end search-box -->

<table class="adminlist" cellspacing="1"> 
<thead> 
<tr> 
	<th width="20">#</th> 
	<th width="20"><input type="checkbox" name="toggle" value="user_ids[]" /></th> 
	<th class="title">
		<a href="javascript:void();">登录名</a>
	</th> 
	<th width="7%" nowrap="nowrap">
		<a href="javascript:void();">所属管理组</a>
	</th>
	<th width="10%" nowrap="nowrap">
		<a title="点击以便按本栏进行排序" href="javascript:changeOrderWay('dt_last_login');"> 
			上次登录时间
			<?php if ($order_by === 'dt_last_login') : ?>
			<img src="<?php echo $adminPath; ?>/images/system/sort_<?php echo $order_way; ?>.png" alt="<?php echo $order_way; ?>" />
			<?php endif; ?>
		</a> 
	</th> 
	<th width="7%" nowrap="nowrap"> 
		<a title="点击以便按本栏进行排序" href="javascript:changeOrderWay('ip_last_login');"> 
			上次登录IP
			<?php if ($order_by === 'ip_last_login') : ?>
			<img src="<?php echo $adminPath; ?>/images/system/sort_<?php echo $order_way; ?>.png" alt="<?php echo $order_way; ?>" /> 
			<?php endif; ?>
		</a> 
	</th> 
	<th width="1%" nowrap="nowrap"> 
		<a href="javascript:void();">ID</a>	
	</th> 
	<th width="16%" nowrap="nowrap" title="系统管理员只能被自己修改；如果没有“管理员管理”权限，则不显示“修改”和“删除”按钮">
		<a href="javascript:void();">操作</a> 
	</th> 
</tr> 
</thead> 

<tfoot> 
<?php $this->display('common/pagination.phtml'); ?>
</tfoot> 

<tbody>
<?php foreach ($models as $key => $model) : ?>
<tr class="row<?php echo ($key%2); ?>"> 
	<td align="right"><?php echo ($key+1); ?></td> 
	<td align="center">
		<input type="checkbox" name="user_ids[]" value="<?php echo $model->user_id; ?>" />
	</td> 
	<td>
		<span class="editlinktip hasTip" title="点击编辑该用户::管理员名称"> 
			<a href="#"><?php echo $model->user_loginname; ?></a> 
		</span>
	</td>
	<td align="center"><?php echo $model->Groups->group_name; ?></td> 
	<td align="center"><?php echo $model->dt_last_login; ?></td>
	<td align="center"><?php echo $model->ip_last_login; ?></td>
	<td align="center"><?php echo $model->user_id; ?></td>
	<td align="center">
		<a href="<?php echo CRequest::getInstance()->createUrl(array('id' => $model->user_id), 'edit'); ?>">修改</a> | 
		<a href="javascript:edit('trashOrRestore', <?php echo $model->user_id; ?>);"><?php echo CControllerConfig::getAction() == 'list' ? '放入回收站' : '还原'; ?></a> | 
		<a href="javascript:edit('delete', <?php echo $model->user_id; ?>);">彻底删除</a>
	</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="order_way" value="<?php echo $order_way; ?>" /> 
<input type="hidden" name="user_id" value="0" /> 
<input type="hidden" name="do" value="" /> 
</form>